﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CreateMapHandler : MonoBehaviour {

    public GameObject[] goes;
    private int x = -40;
    private int y = 40;
    
	// Use this for initialization
	void Start () {
        InvokeRepeating("Create",30,10);

    }
	
    void Create()
    {
        x -= 20;
        y += 20;
        GameObject go = Instantiate(goes[Random.Range(0, 3)], this.gameObject.transform);
        go.transform.position = new Vector3(x, 0, y);
    }



}
